package com.app.service;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.app.dao.RoleDao;
import com.app.model.Role;

@Service
public class RoleService {
	@Resource
	private RoleDao roleDao;
	
	public List<Role> findAllByPage(String sql){
		return roleDao.findAllByPage(sql);
	}

	public Integer getCount(String sql) {
		return roleDao.getCount(sql);
	}

	public void save(Role role) {
		roleDao.save(role);
	}
	
	public void update(Role role) {
		roleDao.update(role);
	}
	
	public void delete(Long id) {
		roleDao.delete(id);
	}

	public Role getById(Long id) {
		return roleDao.getById(id);
	}
}
